# == Schema Information
#
# Table name: orders
#
#  id            :integer          not null, primary key
#  merchant_id   :integer
#  user_id       :integer
#  order_status  :string(255)
#  amount        :float
#  tax           :float
#  shipping      :float
#  shipping_type :string(255)
#  total_amount  :float
#  created_at    :datetime         not null
#  updated_at    :datetime         not null
#  order_num     :string(255)
#

class Order < ActiveRecord::Base   
  belongs_to :merchant
  belongs_to :user
  has_many :order_items  
  include EnumsHelper::OrderStatus  
  attr_accessor :merchant_id, :user_id, :order_status, :amount, :total_amount, :order_num
  
  # def initialize(order_id)
    # @order_num = order_id
    # @order_status = EnumsHelper::OrderStatus::INIT
  # end
#   
end
